<template>
  <div class="venue-layout">
    <div class="page-header">
      <div class="container">
        <h1 class="page-title">展馆布局</h1>
        <p class="page-subtitle">展馆平面图和展区分布</p>
      </div>
    </div>
    <div class="container">
      <section class="layout-section">
        <h2 class="section-title">展馆布局</h2>
        <div class="layout-content">
          <div class="layout-intro">
            <h3>展馆平面图</h3>
            <p>展馆总面积达50,000平方米，分为A、B、C三个主要展区，每个展区都有明确的功能定位和展品分类。</p>
          </div>
          <div class="venue-map">
            <div class="map-container">
              <div class="map-image">
                <img src="https://images.unsplash.com/photo-1552664730-d307ca884978?w=800&h=600&fit=crop" alt="展馆平面图">
              </div>
              <div class="map-overlay">
                <div class="area-marker" v-for="area in venueAreas" :key="area.id" :style="area.position">
                  <div class="marker-tooltip">
                    <h4>{{ area.name }}</h4>
                    <p>{{ area.description }}</p>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="area-details">
            <div class="area-item" v-for="area in venueAreas" :key="area.id">
              <div class="area-header">
                <h4>{{ area.name }}</h4>
                <span class="area-size">{{ area.size }}</span>
              </div>
              <p>{{ area.description }}</p>
              <div class="area-features">
                <span v-for="feature in area.features" :key="feature" class="feature-tag">{{ feature }}</span>
              </div>
            </div>
          </div>
        </div>
      </section>
    </div>
  </div>
</template>

<script>
import { ref } from 'vue'

export default {
  name: 'VenueLayout',
  setup() {
    // 展馆区域数据
    const venueAreas = ref([
      {
        id: 1,
        name: 'A区 - 工业机器人展区',
        size: '20,000㎡',
        description: '展示各类工业机器人、自动化设备和智能制造解决方案',
        features: ['工业机器人', '自动化设备', '智能制造'],
        position: { top: '20%', left: '20%' }
      },
      {
        id: 2,
        name: 'B区 - 服务机器人展区',
        size: '15,000㎡',
        description: '展示服务机器人、医疗机器人、教育机器人等应用',
        features: ['服务机器人', '医疗机器人', '教育机器人'],
        position: { top: '20%', left: '60%' }
      },
      {
        id: 3,
        name: 'C区 - 技术创新展区',
        size: '15,000㎡',
        description: '展示最新技术成果、创新产品和研发项目',
        features: ['技术创新', '研发项目', '创新产品'],
        position: { top: '60%', left: '40%' }
      }
    ])

    return {
      venueAreas
    }
  }
}
</script>

<style scoped>
.venue-layout {
  min-height: 100vh;
  background: linear-gradient(135deg, #320063 0%, #4a0a8a 100%);
}

.page-header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 120px 0 80px 0;
  margin-top: 0;
  text-align: center;
  color: white;
}

.page-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.layout-section {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  margin: 2rem 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.section-title {
  font-size: 2rem;
  color: #333;
  margin-bottom: 2rem;
  text-align: center;
}

.layout-content {
  max-width: 1000px;
  margin: 0 auto;
}

.layout-intro {
  margin-bottom: 3rem;
}

.layout-intro h3 {
  font-size: 1.8rem;
  color: #320063;
  margin-bottom: 1rem;
}

.layout-intro p {
  color: #666;
  line-height: 1.8;
  font-size: 1.1rem;
}

.venue-map {
  margin-bottom: 3rem;
}

.map-container {
  position: relative;
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.map-image {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.map-image img {
  width: 100%;
  height: auto;
  display: block;
}

.map-overlay {
  position: absolute;
  top: 2rem;
  left: 2rem;
  right: 2rem;
  bottom: 1rem;
  pointer-events: none;
}

.area-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #320063 0%, #667eea 100%);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.area-marker:hover {
  transform: scale(1.2);
}

.marker-tooltip {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.area-marker:hover .marker-tooltip {
  opacity: 1;
  visibility: visible;
}

.marker-tooltip h4 {
  font-size: 1rem;
  color: #320063;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.marker-tooltip p {
  color: #666;
  font-size: 0.8rem;
  margin: 0;
}

.area-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.area-item {
  background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
  border-radius: 15px;
  padding: 1.5rem;
  border: 1px solid #e0e7ff;
  transition: transform 0.3s ease;
}

.area-item:hover {
  transform: translateY(-3px);
}

.area-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.area-header h4 {
  font-size: 1.2rem;
  color: #320063;
  margin: 0;
  font-weight: 600;
}

.area-size {
  background: linear-gradient(135deg, #320063 0%, #667eea 100%);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

.area-item p {
  color: #666;
  line-height: 1.6;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.area-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.feature-tag {
  background: white;
  color: #320063;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  border: 1px solid #e0e7ff;
}

@media (max-width: 768px) {
  .layout-section {
    padding: 2rem;
    margin: 1rem 0;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .area-details {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .page-subtitle {
    font-size: 1rem;
  }
}
</style>